
package mysql;


import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Mysql {
public static void main(String[] args) {

        Connection connection = null;
        Statement statement = null;

        String url = "jdbc:mysql://localhost/test";
        String user = "root";
        String password = "basak";
        
try{
       connection = DriverManager.getConnection(url, user, password);

       connection.setAutoCommit(false);
       statement = connection.createStatement();
       
        statement.addBatch("INSERT INTO articles(objid,,issue_area,issue_date,author_count,article_name,journal_name,volume,issue,page_count,publisher_name) VALUES(1,'xx',02.01.2001,1,'xx','xx''xx','xx',1,'xx')");
} 
catch (SQLException ex)
{
}
finally {

            try {
 
                if (statement != null) {
                    statement.close();
                }
                if (connection != null) {
                    connection.close();
                }
   
}
            catch (SQLException ex)

        {}
            
   
}  }}
